<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>编辑</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script src="../../../../lib/include.js"></script>

    <style>
        .form-control:focus,
        .single-line:focus { border-color: #0e9aef !important;}
        .checkbox-inline {line-height: 5px;}
    </style>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content" id="app" v-cloak>

        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <form id="Form" autocomplete="off">
                    <div style="padding: 0">
                        <input type="hidden" name="id" value="">
                        <input type="hidden" name="status" value="1">
                        <input type="hidden" name="version" value="0">
                        <div class="col-sm-12 form-group">
                            <div class="col-sm-6 form-group">
                                <label class="form-inline">名称</label>
                                <input class="form-control" type="text" name="name"
                                       value="" placeholder="请输入名称">
                            </div>
                            <div class="col-sm-6 form-group">
                                <label class="form-inline">优惠卷分类</label>
                                <div>
                                    <select class="form-control" name="type" id="type" @change="selectType">
                                        <option v-for="(item, index) in selects" :value="item.keyS">{{item.keyValue}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-12 form-group">
                            <div class="col-sm-6 form-group">
                                <label class="form-inline">优惠券面值 <span style="color: red">【若为折扣直接输入折扣(例：一折填入1)】</span></label>
                                <div class="input-group">
                                    <input class="form-control" type="text" min="0" oninput="value=value.replace(/[^\d(\.\d{1,2})]/g,'')" name="couponMoney"
                                           value="0" placeholder="请输入优惠券面值"><span class="input-group-addon">{{unit}}</span>
                                </div>
                            </div>
                            <div class="col-sm-6 form-group">
                                <label class="form-inline">最低消费金额</label>
                                <input class="form-control" type="text" min="0" oninput="value=value.replace(/[^\d(\.\d{1,2})]/g,'')" name="minUseMoney"
                                       value="0" placeholder="请输入最低消费金额">
                            </div>
                        </div>
                        <div class="col-sm-12 form-group">
                            <div class="col-sm-4 form-group">
                                <label class="form-inline">使用期限天数</label>
                                <input class="form-control" type="number" min="0" name="useTerm"
                                       value="0" placeholder="请输入使用期限天数">
                            </div>
                            <div class="col-sm-4 form-group">
                                <label class="form-inline">排序</label>
                                <input class="form-control" type="number" name="sort"
                                       value="100" placeholder="请输入排序">
                            </div>
                            <div class="col-sm-4 form-group">
                                <label class="form-inline">门店</label>
                                <select class="form-control" name="schoolId" >
                                    <option v-if="schoolId == ''" value="">---公用---</option>
                                    <option v-for="(value, key) in schoolList" :key="key" :value="key">{{value}}</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div style="text-align: center">
                        <a href="javascript:parent.layer.closeAll();" class="btn btn-default" style="width: 10%;">关 闭</a>
                        <button type="submit" class="btn btn-primary" style="width: 10%;" v-if="permission(0)" >保存</button>
                        <button type="submit" class="btn btn-primary" style="width: 10%;" v-else="permission(1)" >保存</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="../../../../js/coupon-manage/coupon/coupon/edit.js"></script>
</body>
</html>
